package com.bjsxt.livegoods.banner.service.config;

import com.bjsxt.livegoods.dao.banner.BannerDao;
import com.bjsxt.livegoods.dao.banner.BannerDaoImpl;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.mongodb.core.MongoTemplate;

/**
 * 轮播图配置对象
 */
@Configuration
public class BannerConfiguration {
    //启动的时候，创建Banner数据访问对象
    @Bean
    public BannerDao bannerDao(MongoTemplate mongoTemplate){
        BannerDaoImpl dao=new BannerDaoImpl();
        dao.setMongoTemplate(mongoTemplate);
        return dao;
    }
}
